package com.powernode.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.powernode.domain.Notice;
import com.powernode.mapper.NoticeMapper;
import com.powernode.service.NoticeService;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> implements NoticeService{

    /**
     * 新增通知
     *
     * @param notice
     * @return
     */
    @Override
    public boolean saveNotice(Notice notice) {
        notice.setCreateTime(new Date());
        notice.setShopId(1L);
        return this.save(notice);
    }
}
